<?php
class Admin_Model_Catalogs extends Zend_Db_Table_Abstract{
	protected $_name = "catalogs";
	protected $_primary = "caID";
	
	public function show_catalogs(){
		$query = $this -> select();
		$query->from('catalogs');
		$data = $this-> fetchAll($query);
		return $data -> toArray();
	}
	
	public function insert_group($data){
		$this->insert($data);
	}
	
	public function delete_group($id){
		$where="ma_danh_muc=".$id;
    	$this->delete($where);
	}

	public function update_group($id,$data){		
		$where = "ma_danh_muc=".$id;
		$this->update($data,$where);
		
	}	
}